/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package wyse.server.web;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author cwpl-wkurek
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            final WebServer server = new WebServer(args);

            Runtime.getRuntime().addShutdownHook(new Thread() {
                @Override
                public void run() {
                    server.stop();
                }
            });
            
            server.start();
        } catch(Throwable t) {
            Logger.getLogger("Main").log(Level.SEVERE, "Unhandled exception", t);
        }
    }
}
